package com.k.ums.service;

import com.k.ums.dao.SysUserMapper;
import com.k.ums.model.SysUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.UUID;

/**
 * @Description:
 * @Author: kt
 * @CreateTime: 2022/1/9
 */

@Service
@Slf4j
public class SysUserService {

    @Resource
    private SysUserMapper sysUserMapper;

    public SysUser selectById(Integer id) {
        return sysUserMapper.selectByPrimaryKey(id);
    }

    public int insert(SysUser sysUser) {
        return sysUserMapper.insert(sysUser);
    }

    public SysUser selectUserByName(String username) {
        return sysUserMapper.selectUserByName(username);
    }

    public int update(SysUser sysUser){
        return sysUserMapper.updateByPrimaryKey(sysUser);
    }
}
